-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lshift and rshift operators #7741
Add lshift and rshift operators #7741
Conversation
Grepping for |
I forgot to say, this looks pretty great already. We just need tests. Thank you! |
Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>
Type checking throws errors on existing test lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @abrammer !
for more information, see https://pre-commit.ci
Example use in computation.rst and entry in whats-new
for more information, see https://pre-commit.ci
The commits yesterday were to add an entry to whats-new and a couple examples lines to the computation doc page. I didn't find the binary_ops listed in methods anywhere, so this was the best idea I had? In the block just above missing-values: https://xray--7741.org.readthedocs.build/en/7741/user-guide/computation.html#missing-values Otherwise, I think this is done from my perspective. |
Thanks @abrammer very nice work! |
* main: Introduce Grouper objects internally (pydata#7561) [skip-ci] Add cftime groupby, resample benchmarks (pydata#7795) Fix groupby binary ops when grouped array is subset relative to other (pydata#7798) adjust the deprecation policy for python (pydata#7793) [pre-commit.ci] pre-commit autoupdate (pydata#7803) Allow the label run-upstream to run upstream CI (pydata#7787) Update asv links in contributing guide (pydata#7801) Implement DataArray.to_dask_dataframe() (pydata#7635) `ds.to_dict` with data as arrays, not lists (pydata#7739) Add lshift and rshift operators (pydata#7741) Use canonical name for set_horizonalalignment over alias set_ha (pydata#7786) Remove pandas<2 pin (pydata#7785) [pre-commit.ci] pre-commit autoupdate (pydata#7783)
This seems a little too easy, but the PR just adds lshift and rshit to
generate_ops.py
andops.py
then generated the 2 stub files withgenerate_ops.py
.whats-new.rst
<<
>>
syntax for dataarrays and datasets.api.rst
I'll wait for initial review before spending time on whats-new and api docs.
This enables bit shifting on arrays (when the type supports it).